package com.zhc.dejingapi.pojo.erp;

import lombok.Data;

@Data
public class BomworkRoutingModel {
    private Integer opSeq;//工序行号
    private String opCode;//工序编号
    private String opName;//工序名称
    private Long opRefer;//
    private Long opQty;//计划数
    private Integer opRatio;//报工数配比
    private String proBatchCode;//批次号
    private String isFirstFlag;//是否为首道工序
    private String isLastFlag;//是否为末道工序
    private String detailRowStatus;//状态 未开始，已启动，暂停，已结束
    private String randcodes;//随机数
    private String detailmemo;//备注
    private String planStartTime;//计划开始时间
    private String planEndTime;//计划结束时间
    private String machineCode;//机台
    private String moldCode;//模具编号

    public  void CopyData(PRoutingDetailModel routingDetailModel){
        opSeq=routingDetailModel.getOpSeq();
        opCode=routingDetailModel.getOpCode();
        opName=routingDetailModel.getOpName();
        opRefer=routingDetailModel.getOpRefer();
        if (routingDetailModel.getOpRatio()==null){
            opRatio=1;
        }
        else{
            opRatio=(int)Math.round(routingDetailModel.getOpRatio());
        }

        isFirstFlag=routingDetailModel.getIsFirstFlag();
        isLastFlag=routingDetailModel.getIsLastFlag();
        randcodes=routingDetailModel.getRandcodes();
        detailmemo=routingDetailModel.getDetailmemo();

    }
}
